
################################################################################
CMAKE_MINIMUM_REQUIRED (VERSION 2.6) 
PROJECT( CollDet )
LIST( APPEND CMAKE_MODULE_PATH ${${PROJECT_NAME}_SOURCE_DIR}/CMake )

################################################################################
# Build Options

#SET( BUILD_VERBOSE ON )
#SET( CMAKE_VERBOSE_MAKEFILE ON )
SET( BUILD_DEBUG ON )
SET( BUILD_TEST ON )
SET( BUILD_DEMO ON )

SET( BUILD_WITH_WRAPPER ON )
SET( BUILD_WITH_OPENGL ON )
SET( BUILD_WITH_OPENSG ON )
SET( BUILD_WITH_OPENSCENEGRAPH ON )
SET( BUILD_WITH_BULLET on )
SET( BULLET_ROOT "/usr/local" )

SET( ${PROJECT_NAME}_VERSION_CMAKE "1.0" )
SET( FILE_LOAD_PATH_CMAKE "${PROJECT_SOURCE_DIR}/data/" )
SET( CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/install )

################################################################################
# Preprocessing...

INCLUDE( BuildFunctions )

IF( BUILD_DEBUG )
    SET( CMAKE_BUILD_TYPE Debug )
ENDIF( BUILD_DEBUG )

# configure a header file to pass some of the CMake settings
# to the source code
CONFIGURE_FILE (
      "${PROJECT_SOURCE_DIR}/config.h.in"
      "${PROJECT_SOURCE_DIR}/src/config.h"
      )
       
SET( CMAKE_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_PREFIX}/include/coll )
SET( CMAKE_INSTALL_EXECUTE_DIR ${CMAKE_INSTALL_PREFIX}/bin )

IF( BUILD_DEBUG )
SET( CMAKE_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_PREFIX}/lib/dbg )
ElSE( BUILD_DEBUG )
SET( CMAKE_INSTALL_LIBRARY_DIR ${CMAKE_INSTALL_PREFIX}/lib/opt )
ENDIF( BUILD_DEBUG )

################################################################################
# building...

ADD_SUBDIRECTORY( src )

################################################################################
